package com.belf.console.domain;

import com.belf.common.annotation.Excel;
import com.belf.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 数据源信息对象 data_source_info
 * 
 * @author belf
 * @date 2024-06-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DataSourceInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private String id;

    /** 名称 */
    @Excel(name = "名称")
    private String dataSourceName;

    /** 类型 */
    @Excel(name = "类型")
    private String type;

    /** 驱动类 */
    private String driver;

    /** ip */
    @Excel(name = "ip")
    private String ip;

    /** 端口 */
    @Excel(name = "端口")
    private Integer port;

    /** 数据库 */
    @Excel(name = "数据库")
    private String databaseName;

    /** 数据库 */
    @Excel(name = "catalogName")
    private String catalogName;

    /** 数据库 */
    @Excel(name = "schemaName")
    private String schemaName;
    private String serviceName;
    private String sid;

    /** 用户 */
    private String uname;

    /** 密码 */
    private String pwd;

    /** 区分大小写 */
    private String caseSensitive;

    /** 自动提交 */
    private String autoCommit;

    /** 连接超时 */
    private Long connectTimeout;

    /** 会话超时 */
    private Long socketTimeout;

    /** 编码格式 */
    private String encoding;

    /** Unicode */
    private String useUnicode;

    /** URL */
    private String url;

    /** 联通状态 */
    @Excel(name = "联通状态")
    private Long testStatus;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    private Integer dataType;
    private String taskMode;
    private String executeSql;

    private String tableName;
    private String[] tableNames;

    private String fieldCase;

    private String quote;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setDataSourceName(String dataSourceName)
    {
        this.dataSourceName = dataSourceName;
    }

    public String getDataSourceName()
    {
        return dataSourceName;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setDriver(String driver)
    {
        this.driver = driver;
    }

    public String getDriver()
    {
        return driver;
    }
    public void setIp(String ip)
    {
        this.ip = ip;
    }

    public String getIp()
    {
        return ip;
    }
    public void setPort(Integer port)
    {
        this.port = port;
    }

    public Integer getPort()
    {
        return port;
    }
    public void setDatabaseName(String databaseName)
    {
        this.databaseName = databaseName;
    }

    public String getDatabaseName()
    {
        return databaseName;
    }
    public void setUname(String uname)
    {
        this.uname = uname;
    }

    public String getUname()
    {
        return uname;
    }
    public void setPwd(String pwd)
    {
        this.pwd = pwd;
    }

    public String getPwd()
    {
        return pwd;
    }
    public void setCaseSensitive(String caseSensitive)
    {
        this.caseSensitive = caseSensitive;
    }

    public String getCaseSensitive()
    {
        return caseSensitive;
    }
    public void setAutoCommit(String autoCommit)
    {
        this.autoCommit = autoCommit;
    }

    public String getAutoCommit()
    {
        return autoCommit;
    }
    public void setConnectTimeout(Long connectTimeout)
    {
        this.connectTimeout = connectTimeout;
    }

    public Long getConnectTimeout()
    {
        return connectTimeout;
    }
    public void setSocketTimeout(Long socketTimeout)
    {
        this.socketTimeout = socketTimeout;
    }

    public Long getSocketTimeout()
    {
        return socketTimeout;
    }
    public void setEncoding(String encoding)
    {
        this.encoding = encoding;
    }

    public String getEncoding()
    {
        return encoding;
    }
    public void setUseUnicode(String useUnicode)
    {
        this.useUnicode = useUnicode;
    }

    public String getUseUnicode()
    {
        return useUnicode;
    }
    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getUrl()
    {
        return url;
    }
    public void setTestStatus(Long testStatus)
    {
        this.testStatus = testStatus;
    }

    public Long getTestStatus()
    {
        return testStatus;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("dataSourceName", getDataSourceName())
            .append("type", getType())
            .append("driver", getDriver())
            .append("ip", getIp())
            .append("port", getPort())
            .append("database", getDatabaseName())
            .append("uname", getUname())
            .append("pwd", getPwd())
            .append("caseSensitive", getCaseSensitive())
            .append("autoCommit", getAutoCommit())
            .append("connectTimeout", getConnectTimeout())
            .append("socketTimeout", getSocketTimeout())
            .append("encoding", getEncoding())
            .append("useUnicode", getUseUnicode())
            .append("url", getUrl())
            .append("testStatus", getTestStatus())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }

    public void setCatalogName(String catalogName) {
        this.catalogName = catalogName;
    }

    public String getCatalogName() {
        return this.catalogName;
    }

    public void setSchemaName(String schemaName) {
        this.schemaName = schemaName;
    }

    public String getSchemaName() {
        return this.schemaName;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }
    public Integer getDataType() {
        return this.dataType;
    }
}
